{extend name="default/users/base" /}
{block name="title"}首页-买家中心{__block__}{/block}
{block name="css"}
{/block}
{block name="content"}
<style>
.wst-addr tbody tr td{padding: 5px;}
.tips{margin-left:20px;}
</style>
  <div class="wst-user-head" style="margin-bottom: 10px"><span>发票管理</span></div>
	<input type="button" value="新增发票" class="wst-sec-but u-btn addr-btn" onclick="location.href=WST.U('home/invoices/toEdit')" /><span class='tips'>(最多新增20条发票记录)</span>
        <script id="invoices" type="text/html">
            {{# for(var i = 0, len = d.length; i < len; i++){ }}
            <table class='wst-addr' >
               <tr>
                   <td class="addr-title">发票类型：</td>
                <td><p class="default" style="margin-left:0">{{d[i].invoiceType==0?'普票':'专票'}}</p></td>
              </tr>

               <tr><td class="addr-title">发票抬头：</td>
                 <td>{{d[i].invoiceHead}}</td>
               </tr>
               <tr><td class="addr-title">公司税号：</td>
                 <td>{{d[i].invoiceCode}}</td>
               </tr>
               {{#  if(d[i].invoiceType==1) { }}
               <tr><td class="addr-title">注册地址：</td>
                 <td>{{d[i].invoiceAddr}}</td>
               </tr>
               <tr><td class="addr-title">注册电话：</td>
                 <td>{{d[i].invoicePhoneNumber}}</td>
               </tr>
               <tr><td class="addr-title">开户银行：</td>
                 <td>{{d[i].invoiceBankName}}</td>
               </tr>
               <tr><td class="addr-title">银行账号：</td>
                 <td>{{d[i].invoiceBankNo}}</td>
               </tr>
               {{# }  }}

               <tr>
                 <td>&nbsp;</td>
                 <td class='edit' style="padding-bottom: 10px;">
                   <a href="javascript:delInvoice({{ d[i].id }},this)">删除</a>
                   <a href="javascript:editInvoice({{ d[i].id }})">编辑</a>
                   <div class="wst-clear"></div>
                 </td>
               </tr>
            </table>
            {{# } }}
           </script>
           <div id="invoices_box" class="invoices_box">
              
           </div>

{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/users/invoices/invoices.js?v={$v}'></script>
<script>
$(function(){
  listQuery();
});
</script>
{/block}
